<script>
  var ws = new WebSocket('ws://127.0.0.1:2000');
  ws.onopen = function() {
    console.log('连接成功');
  };
  ws.onmessage = function(e) {
    console.log('收到服务器消息：' + e.data);
  };
</script>
<p>
  <a href="file:///C:/Users/rise/Desktop/%E9%A6%96%E9%A1%B5/default/10.html">返回</a>
</p>